int isActiveGameOver = 0;
int timeInStateGameOver = 0;
int SECS_IN_GAMEOVER = 4;

// ---------- ----------
// code specific to the Options state
// ---------- ----------

void drawGameOver ()
{
	if (isActiveGameOver == 0) {
		initStateGameOver();
	}
	if ((millis() - timeInStateGameOver) > SECS_IN_GAMEOVER*1000 ) {
		isActiveGameOver=0;
		state = 1;
		justCameIn = 1;
	}
	buildGameOver();
	
}


void initStateGameOver() {

	play_multi_sound ("explosioncentre");	
	play_multi_sound("gameover");
	isActiveGameOver = 1;
	timeInStateGameOver = millis();
}

void buildGameOver() {
	strokeWeight(3);
	stroke(120);
	fill ( 0 );
	textAlign(CENTER);
	PFont fontA = loadFont("arial");
	int size=100;
	textFont(fontA, size);
	text ( "GAME OVER", 10, height/2-size,width-10,width-20);
	size=50;
	textFont(fontA, size);
	text ( "Score: " + curScore, 10, height/2+size,width-10,width-20);
}


void keyPressedGameOver() {
	//println("Key:" + keyCode);
}
